<?php

namespace App\Http\Controllers\Admin\Service;

use App\Http\Controllers\Controller as BaseController;
use App\Repository\Service\ServiceLogsRepository;
use Illuminate\Http\Request;

// 客服模块
class LogsController extends BaseController
{
    private $repoist;

    public function __construct(ServiceLogsRepository $repository)
    {
        $this->repoist = $repository;
    }

//列表
    public function index(Request $request)
    {
//         var_dump($where);


        return $this->repoist->index($request, $request->get('pageNum'), $request->get('pageSize'));
    }

//   记录操作
    public function add(Request $request)
    {
        $userId = $request->user->id;
        if (empty($userId)) {
            return $this->returnMsg(1, '请登陆后操作');
        }
        return $this->repoist->add($request);
    }

}
